package com.szp.lagou.dubbo.filerDemo.consumer.config;

import com.szp.lagou.dubbo.filerDemo.filter.TransportIPFilter;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@EnableDubbo
@Configuration
@PropertySource("classpath:/dubbo-consumer.properties")
@ComponentScan("com.szp.lagou.dubbo.filerDemo.consumer.controller")
public class ConsumerConfig {
    @Bean
    public RegistryConfig registryConfig() {
        RegistryConfig registryConfig = new RegistryConfig();
        registryConfig.setAddress("zookeeper://127.0.0.1:2181?timeout=10000");
        return registryConfig;
    }
}
